<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>GTool</title>
    <link rel="shortcut icon" type="image/x-icon" th:href="@{/img/favicon.ico}">
    <link rel="stylesheet" th:href="@{/css/common.css}" />
    <link rel="stylesheet" th:href="@{/css/tools.css}" />
    <script th:src="@{/js/common.js}"></script>
    <script th:src="@{https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js}"></script>
    <script th:src="@{https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js}" type="text/javascript" charset="utf-8"></script>
    <script th:src="@{https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ext-language_tools.js}" type="text/javascript" charset="utf-8"></script>
    <script th:src="@{/js/tools.js}"></script>
</head>
<body>
    <div class="container">
        <div class="route">
            <button class="route-button" th:each="route : ${routes}" th:text="${route.name}" th:value="${route.value}" onclick="route(this)"/>
            <button class="share-btn" id="share-button" onclick="share()">🔗一键分享</button>
            <button class="theme-btn" onclick="changeTheme()">🌙/☀️</button>
        </div>
        <pre id="code" class="ace_editor" style="min-height:80vh">
            <label for="in"></label><textarea id="in" class="ace_text-input"></textarea>
        </pre>
        <div class="func" id="ops">
            <button th:each="op : ${ops}" th:text="${op.name}" th:value="${op.op}" onclick="execute(this)"/>
        </div>
    </div>
    <div class="footer">All Rights Reserved JingWei·Guo &copy; 2024-2025 <a href="https://gitee.com/jingwei129/gtool">Gitee</a></div>
    <input type="hidden" id="sv" th:value="${share}" />
    <input type="hidden" id="ro" th:value="${ro}" />
    <script>
        var sv = document.getElementById('sv').value;
        init('json', sv);
    </script>
</body>
</html>

